package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * The interface Dish flavor mapper.
 */
@Mapper
public interface DishFlavorMapper {
    /**
     * 批量新增
     *
     * @param flavors the flavors
     */
    void insertBatch(List<DishFlavor> flavors);


    /**
     * 根据id批量删除
     *
     * @param dishIds the dish ids
     */
    void deleteByDishIds(List<Long> dishIds);

    /**
     * Select by dish id list.
     *
     * @param dishId the dish id
     * @return the list
     */
    @Select("select id, dish_id, name, value from dish_flavor where dish_id = #{dishId}")
    List<DishFlavor> selectByDishId(Long dishId);



}
